import { defHttp } from '@/utils/http/axios';

export function get(params) {
  return defHttp.get({ url: 'sysConfig/Tree', params });
}
export function set(data) {
  data = Array.isArray(data) ? data : [data];
  data.forEach((item) => {
    item.dataType = item.dataType == 0 ? 1 : item.dataType;
  });
  return defHttp.post({ url: 'SysConfig', data });
}
export function del(data) {
  return defHttp.delete({ url: 'SysConfig', data });
}
export function reset() {
  return defHttp.post({ url: 'app/restart' });
}
export function ping() {
  return defHttp.post({ url: 'SysConfig/DbPing' });
}
export function redis() {
  return defHttp.post({ url: 'SysConfig/RedisPing' });
}
